home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Report Writers / Crystal Repot 9.0 Full CD version / Setup.exe / Windows / System32 / HTMLRE90.DLL / HTML / 11814 < prev    next >
Encoding:
Text File  |  2002-07-05  |  3.7 KB  |  152 lines

  1. <script>
  2.  
  3. var useLandscape = %4;
  4. var paperSize = "%5";
  5.  
  6. function InitExtra()
  7. {
  8.     if ( useLandscape )
  9.         document.layoutform.orientation[1].checked = true;
  10.     else
  11.         document.layoutform.orientation[0].checked = true;
  12.  
  13.     var i;
  14.     for ( i = 0; i < document.layoutform.papersize.length; i++)
  15.     {
  16.         if ( document.layoutform.papersize.options[i].value == paperSize )
  17.         {
  18.             document.layoutform.papersize.selectedIndex = i;
  19.             break;
  20.         }
  21.     }
  22.  
  23.     if ( paperSize == "0" )
  24.         InitCustomSize();
  25.  
  26.     OnSetNoPrinter();
  27. }
  28.  
  29. function OnSetNoPrinter()
  30. {
  31.     var isDisabled =  document.layoutform.usenoprinterchk[0].checked;
  32.  
  33.     document.layoutform.orientation.disabled = isDisabled;
  34.  
  35.     if ( document.layoutform.papersize.options[document.layoutform.papersize.selectedIndex].value == "0" )
  36.     {
  37.         document.layoutform.inchmm[0].disabled = isDisabled;
  38.         document.layoutform.inchmm[1].disabled = isDisabled;
  39.         document.layoutform.visiblewidth.disabled = isDisabled;
  40.         document.layoutform.visibleheight.disabled = isDisabled;
  41.     }
  42.     document.layoutform.orientation[0].disabled = isDisabled;
  43.     document.layoutform.orientation[1].disabled = isDisabled;
  44.     document.layoutform.papersize.disabled = isDisabled;
  45. }
  46.  
  47. function ChangePaperSize(d)
  48. {
  49.     if ( ( (paperSize == "0") && (d != "0") ) || ( (paperSize != "0") && (d == "0") ) )
  50.     {
  51.         if ( !CheckPrintWhenScheduling() )
  52.             return;
  53.  
  54.         document.layoutform.layout.value = "4";
  55.         document.layoutform.action = "%1";
  56.         document.layoutform.submit();
  57.     }
  58. }
  59.  
  60. function CheckCustom()
  61. {
  62.     if ( document.layoutform.usenoprinterchk[0].checked )
  63.     {
  64.         document.layoutform.usenoprinter.value = "true";
  65.         document.layoutform.layout.value = "2";
  66.     }
  67.     else
  68.     {
  69.         document.layoutform.usenoprinter.value = "false";
  70.         document.layoutform.layout.value = "4";
  71.  
  72.         if (  paperSize == "0" )
  73.             if ( !CheckCustomSize() )
  74.                 return false;
  75.     }
  76.  
  77.     return true;
  78. }
  79.  
  80. </script>
  81. <tr>
  82.     <td class="list">
  83.          
  84.     </td>
  85.     <td class="list">
  86.         <table border=0 cellpadding=2 cellspacing=0>
  87.         <tr>
  88.             <td class="list" colspan=2>
  89.                 Base your page layout on standard settings or specify a custom layout.
  90.             </td>
  91.         </tr>
  92.         <tr>
  93.             <td class="list" valign="middle" width=5%>
  94.                 <input type="radio" name="usenoprinterchk" %2 value="true" onClick="OnSetNoPrinter();">
  95.                 <input type="hidden" name="usenoprinter">
  96.             </td>
  97.             <td class="list">
  98.                 Use standard layout settings <!-- no printer -->
  99.             </td>
  100.         </tr>
  101.         <tr>
  102.             <td class="list" valign="middle">
  103.                 <input type="radio" name="usenoprinterchk" %3 value="false" onClick="OnSetNoPrinter();">
  104.             </td>
  105.             <td class="list">
  106.                 Use custom layout settings
  107.             </td>
  108.         </tr>
  109.         <tr>
  110.             <td class='list'> </td>
  111.             <td class='list'>
  112.                 <table border=0 cellpadding=2 cellspacing=0>
  113.                 <tr>
  114.                     <td class='list' valign=middle>
  115.                         Orientation: 
  116.                     </td>
  117.                     <td class='list'>
  118.                         <table border=0 cellpadding=2 cellspacing=0>
  119.                         <tr>
  120.                             <td class="list" width=50% nowrap>
  121.                                 <input type="radio" name="orientation" value="portrait"> Portrait
  122.                             </td>
  123.                             <td class="list" nowrap>
  124.                                 <input type="radio" name="orientation" value="landscape"> Landscape
  125.                             </td>
  126.                         </tr>
  127.                         </table>
  128.                     </td>
  129.                 </tr>
  130.                 <tr>
  131.                     <td class='list' valign=middle>
  132.                         Paper Size:
  133.                     </td>
  134.                     <td class='list'>
  135.                         <select name='papersize' class='menuFormElement' onchange='ChangePaperSize(this.options[this.selectedIndex].value);'>
  136.                         <option value='1'>A4
  137.                         <option value='2'>A5
  138.                         <option value='3'>B5
  139.                         <option value='4'>Legal
  140.                         <option value='5'>Letter
  141.                         <option value='0'>Custom
  142.                         </select>
  143.                     </td>
  144.                 </tr>
  145.         %6
  146.                 </table>
  147.             </td>
  148.         </tr>
  149.         </table>
  150.     </td>
  151. </tr>
  152.